<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>打印n以内的奇数</title>
</head>
<body>
    
</body>
<script>
    //打印n以内的奇数

    function OddNmber(n) {
        for(var i = 1; i <= n; i++) {
            if(i % 2 != 0) {
                document.write(n + '以内的奇数是：' + i + '<br>');
            }
        }
    }

    //调用
    OddNmber(200);

</script>
</html>